import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  column: [
    {
      type: 'input',
      label: '主键',
      prop: 'id',
      span: 12,
      hide: true,
      display: false
    },
    {
      type: 'input',
      label: '创建人ID',
      prop: 'createId',
      span: 12,
      hide: true,
      display: false
    },
    {
      type: 'input',
      label: '分类名称',
      prop: 'name',
      span: 12,
      maxLength: 64,
      rules: [
        {
          required: true,
          message: '请输入分类名称',
          trigger: 'blur'
        }
      ]
    },
    {
      type: 'input',
      label: '分类编码',
      prop: 'code',
      span: 12,
      rules: [
        {
          required: true,
          message: '请输入分类编码',
          trigger: 'blur'
        }
      ]
    },
    {
      type: 'input',
      label: '分类全名称',
      prop: 'fullname',
      span: 12,
      display: false,
      maxLength: 64
    },
    {
      type: 'input',
      label: '分类全编码',
      prop: 'fullcode',
      span: 12,
      display: false,
      maxLength: 64
    },
    {
      type: 'input',
      label: '创建人姓名',
      prop: 'createBy',
      span: 12,
      display: false
    },
    {
      type: 'input',
      label: '创建时间',
      prop: 'createTime',
      span: 12,
      width: 135,
      display: false
    },
    {
      type: 'input',
      label: '创建人所属OU的ID',
      prop: 'deptId',
      span: 12,
      hide: true,
      display: false
    },
    {
      type: 'input',
      label: '创建人所属OU的全称',
      prop: 'deptFullname',
      span: 12,
      hide: true,
      display: false
    },
    {
      type: 'input',
      label: '最后修改人信息',
      prop: 'updateBy',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改时间',
      prop: 'updateTime',
      span: 12,
      hide: true,
      display: false
    },
    {
      type: 'tree',
      label: '所属父类',
      prop: 'parentId',
      span: 24,
      hide: true,
      dicUrl: `${services.adminService}messagecti/tree`,
      dicMethod: 'get',
      props: { label: 'name', value: 'id' }
    }
  ]
}
